Optical disk devices are used for the storage of computer-prepared data and have recognized value in their ability to store large quantities of data. The media for use in such devices is reactive to bursts of light, such as may be produced by the rapid switching of a semiconductor laser. In order to write data on optical media, the laser power must be controlled at a fairly high power level, in order that the media can be altered in accordance with an input data stream. In reading the data back, the laser power level is controlled to a lower level so that the media is not altered by the laser beam but the reflected light indicates the presence or absence of media alterations in accordance with the recorded input data stream.
Optical media is of two general types, media which can be written only once and media which can be written, erased, and written again. Write-once media (WORM) is permanently altered when write power levels are produced by the laser beam. Erasable media, such as magneto-optic (MO) media, is not permanently altered when data is written. In the MO media, the magnetic orientation of the reactive material is altered in the writing process, and in the erasing process, the magnetic orientation is reordered.
When reading MO data from an optical disk, the remanent magnetization of one or the other polarity rotates the linear polarization of a reflected light beam creating P and S polarization components. By detecting these components of the light beam, an MO data signal is generated.
To readback data contained on write-once media, the reflected light beam is intensity modulated by the permanent condition of the disk. By detecting the intensity of the reflected light beam, a Read Only Memory (ROM) signal is generated in accordance with the WORM data.
In operating an optical disk system, it is necessary to identify the particular sector and track upon which the laser beam is directed That identification information is included in sector headers stamped onto the disk itself at the beginning of each sector and is, therefore, of a write-once nature. All current Optical Disk standards use stamped headers, but there are proposed standards where the disk is soft formatted, that is the headers are written in the optical disk system. The inventive system disclosed herein will work equally well with either standard. The user area, that is the data area, which follows the sector header may be either write-once or erasable.
In writing to optical disk media, it is imperative to determine when the user area of a sector has been written or partially written in order to avoid overwriting and thereby destroying data already written to the user area. To do that, the small computer system interface (SCSI) command MEDIUM SCAN is provided. This command can be utilized for both WORM and MO media. When using the command, two format fields can be utilized to determine whether a sector has been written. The first field is the flag field which is written before the user data field in WORM media and sometimes in MO media (optional for MO). The second field is the user data field itself, together with its associated error correcting code (ECC). Use of the flag field alone does not yield a sufficiently reliable determination of whether a sector has been written since defects larger than the flag field (5 bytes) are relatively common in optical recording. The value of the flag field is used primarily as a fail-safe mechanism to abort a write operation on a sector when a flag field is detected.
In erasable media, for example MO, sector directory tables located on the media itself are often used. These tables enable the controlling logic to determine which sectors have been written without checking the sector itself. However, in some MO operating systems it is desirable to read ahead, and that involves reading sectors past the current target sector in anticipation of future accesses. An operation of that type does not involve the checking of directory tables to determine if the sector is blank or not. As a consequence, it is desirable to have a reliable method of determining whether a sector is blank to increase system performance.
In a WORM system, directory tables do not exist and the MEDIUM SCAN command is used to determine whether a sector is written or not. As discussed above, the detected presence or absence of the flag field alone is not sufficiently robust, and therefore it is necessary to scan the user data field to determine whether it has been written.
When checking the user data field, a blank field may be misdetected as written due to noise in the system. For this reason, apparatus and method to reliably detect when a sector has been written, is needed. The solution is a detection technique and apparatus which is more reliable, quicker and easier to implement than previous schemes for detecting data within these format-sensitive areas.